home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / doBakeSimulation.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.9 KB  |  82 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  Nov. 5, 1997
  22. //  Author:         clm
  23. //
  24. //    Procedure Name:
  25. //        doBakeSimulation
  26. //
  27. //    Description:
  28. //        This is the actual function that calls from the "Bake Simulation"
  29. //        option box.
  30. //
  31. //    Input Arguments:
  32. //        $useTS    true : use the current time slider range for the simulation
  33. //                  false : use the $start and $end values for the simulation
  34. //        $start, $end   : only applicable if $useTS is true
  35. //        $by : the increment from start to end time of simulation with which
  36. //              to view frames and capture keyframes
  37. //
  38. //        $below  0/1 : bake on selected items only, or all below
  39. //        $control    0/1 : if 1 and a transform above a shape is selected,
  40. //                            bake animation of all control points also
  41. //        $shapes      0/1 : if 1 and a transform above a shape is selected,
  42. //                            bake attributes of shape as well
  43. //                            (excluding control pts)
  44. //        $imp 0/1 : if we're baking attributes that are controlled by an
  45. //                    implicit animation (i.e. with no explicit DG connections),
  46. //                    then if 1, turn off this implicit control after the
  47. //                    bake is complete (e.g. turn off the IK handle's
  48. //                    effects after baking skeleton joints, controlled by IK)
  49. //        $useCB 0/1 : if 1, set keyframes on attrs specified in channel box
  50. //        $preserveOutsideKeys 0/1 : if 1, preserve keys that are ouside the bake
  51. //                                 range when there are directly connected anim 
  52. //                                 curves
  53. //
  54. //    Return Value:
  55. //        None
  56. //
  57.  
  58. global proc doBakeSimulation( int $useTS, 
  59.                               float $start, 
  60.                               float $end, 
  61.                               float $by,
  62.                               int $below, 
  63.                               int $cp, 
  64.                               int $shapes, 
  65.                               int $imp, 
  66.                               int $useCB ) 
  67. {
  68.     string $args[9];
  69.  
  70.     $args[0] = $useTS;
  71.     $args[1] = $start;
  72.     $args[2] = $end;
  73.     $args[3] = $by;
  74.     $args[4] = $below;
  75.     $args[5] = $cp;
  76.     $args[6] = $shapes;
  77.     $args[7] = $imp;
  78.     $args[8] = $useCB;
  79.  
  80.     doBakeSimulationArgList( "1", $args );
  81. }
  82.